package com.itheima.practice;

public class practice7 {
    public static void main(String[] args) {
        print(30,20);
    }

    public static void print(int a,int b) {
        if(a>b){
            System.out.println("您的输入有误");
            return;
        }
        System.out.println(a+"到"+b+"之间的奇数为");
        for (int i = a; i < b; i++) {
            if (i%2==1){
                System.out.println(i);
            }
        }
    }
}
